You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Tests: a dev-build test run passes what CI's build passes, not 15 failures and an abort - #26910
A plain cargo test builds the tests in the dev profile, which keeps debug assertions. CI's ci profile and the release builds have none. So some tests pass on CI but fail in every local dev-build run, and one test binary aborts. This PR makes those tests pass in a dev build too. It changes tests and the dev build only; the app does not change.
There are three causes:
Dropped texture changes (14 tests). Each egui frame returns the texture uploads that a renderer should apply. In a debug build, egui asserts that these uploads were not dropped. Tests added since Tests: a plain cargo test of the UI crate runs to the end in a dev build #25542 (the last pass at this) again drop a frame's output with its font-atlas upload pending: five in ui-kit, seven in ui-egui, one in window-gpu and one in viewport-egui. A frame that a test throws away now calls drop_without_applying_deltas(), as Tests: a plain cargo test of the UI crate runs to the end in a dev build #25542 did. A frame whose output the test reads clears its textures_delta first.
An abort at thread exit in viewport-gpu (macOS, debug builds). The GPU tests share one device per thread through a thread-local, HELD. When a test thread reused a device that another thread had opened, closing the queue in HELD's destructor opened an autorelease pool on Metal. In a debug build, objc2 records each pool in a thread-local of its own. That thread-local was destroyed first, so the whole binary aborted with "thread local panicked on drop", every run. The test helper now makes a small buffer before it first uses HELD. That opens a pool on Metal, so objc2's thread-local outlives HELD. The helper already does the same for wgpu's own thread-local (Tests: the solidcraft-gpu tests deadlock in the NVIDIA driver on Linux, so cargo xtask ci never finishes #10232).
A dependency's debug assertion in the Gerber reader (1 test).io's gerber::tests::hostile_input_never_panics trips a debug_assert inside cavalier_contours 0.9.0, the latest release. The assertion checks the library's own intermediate data during a polygon boolean. The dev profile now builds this one crate without debug assertions, as CI and the releases already do.
Changes a default: no
Validation
macOS 15, Apple Silicon. Full runs with cargo xtask test (SOLIDCRAFT_TEST_JOBS=4), graded against tests/KNOWN_FAILING_TESTS:
ci profile, on main at 8e3bb3c: 10 tests fail, all Mac-only (listed below). None of the tests in this PR fail.
dev profile, on the same commit: the same 10 tests fail, plus 14 texture tests (main has since fixed one of them and added another), the Gerber test, and the viewport-gpu binary aborts.
dev profile, on this branch (based on 88669e4): the 14 texture tests, the Gerber test and all 155 viewport-gpu tests pass. The Mac-only 10 still fail, as in the ci profile. One new test, issue_report::tests::an_agents_report_sends_the_design_only_on_the_persons_saved_choice (added today), failed once under the full run's load. It passed 3 of 3 runs alone, so it is not a dev-build failure.
viewport-gpu without the change aborted in 8 of 8 runs; with it, 5 of 5 runs passed.
cargo clippy on ui-kit, window-gpu, viewport-egui, viewport-gpu and ui-egui with --all-targets -- -D warnings, and cargo fmt --check: clean.
For reference, the 10 Mac-only failures, unchanged by this PR: kernel step_export_bytes and blend::tests::concave_chord_and_g2_rounds…; doc forms::tests::circular_surface_default_and_denser_guides…; engine extent_tests::a_plain_to_on_an_edge… and extend_to_face_on_an_edge_keeps_the_snapped_face…, hole_face_tests::countersunk_hole_on_plane_tangent_to_cylinder_with_flip…, two component_link tests and cmd::drawing::tests::save_as_keeps_drawing_sources… (all three on /var against /private/var), and flat_export_preserves_original_bytes. Two of these are fixed in #19284 (Tests: two engine tests pass on macOS).
Screenshots of the behavior (when observable)
Tests and the dev build only; nothing changes in the app.
Integration status
Branched from main at 88669e4. It merges cleanly with main at d5900c8. No open PR touches these tests' frame handling, the GPU test helper or the dev profile.
…a dev-build cargo test passes
egui's TexturesDelta asserts in debug builds that a frame's texture uploads were handled. CI's
ci profile has no debug assertions, so tests added since tangency-labs#25542 that dropped a frame with its
font atlas upload pending pass there and fail every dev-profile run: five in ui-kit, seven in
ui-egui, one each in window-gpu and viewport-egui. A frame thrown away now calls
drop_without_applying_deltas(); one whose output the test reads clears its textures_delta.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… debug build
A test thread that reused the shared device another thread opened first used objc2's
autorelease-pool thread-local only when HELD's destructor closed the queue on Metal, after that
thread-local was destroyed: the process aborted with "thread local panicked on drop". Making a
buffer before HELD is first used opens a pool on Metal, so objc2's thread-local outlives HELD.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s CI and releases do
io's gerber::tests::hostile_input_never_panics trips one of cavalier_contours 0.9.0's checks on
its own boolean's intermediate slices. Only dev builds have debug assertions.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Auto incremental reviews are disabled on this repository.
Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
Trigger review
No actionable comments were generated in the recent review.
Walkthrough
The development profile disables debug assertions for cavalier_contours. UI tests now clear or discard rendered texture deltas. The shared GPU test setup creates and destroys a 4-byte buffer after polling the device.
Changes: Development profile
Layer / File(s)
Summary
Dependency assertion override Cargo.toml
The development profile disables debug assertions for cavalier_contours.
This change only affects the dev build profile and tests, so the app behavior is unchanged. It makes plain cargo test pass under the dev profile, and no merge-blocking risk remains.
Pre-merge checks: 5
Check name
Status
Explanation
Title check
The title names the main change: making a plain dev-profile test run match CI's pass results. It is specific to tests and the dev build, and it does not overstate the scope. The wording is slightly aw…
Description check
The description follows the template well. It has a Change section that explains the purpose in plain words, names the three causes, and states that the app does not change. It includes the required '…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Existing Defaults Unchanged
The check fails only if the PR changes a UX default: a default setting or preference, the usual behavior of a command or tool, the default layout or behavior, or shortcuts. I compared the reviewed ran…
Full details: Title check
Explanation
The title names the main change: making a plain dev-profile test run match CI's pass results. It is specific to tests and the dev build, and it does not overstate the scope. The wording is slightly awkward, but the title is accurate and descriptive.
Full details: Description check
Explanation
The description follows the template well. It has a Change section that explains the purpose in plain words, names the three causes, and states that the app does not change. It includes the required 'Changes a default: no' line. It has a detailed Validation section with commands, environment, and before/after results. The Screenshots section says that the change is tests and dev build only. The Integration status section records the base and merge state. The Change section does not add a 'Test change:' line. The template only requires that line when a kernel change alters existing test expectations, and this PR does not touch the kernel. The description is mostly complete.
Full details: Existing Defaults Unchanged
Explanation
The check fails only if the PR changes a UX default: a default setting or preference, the usual behavior of a command or tool, the default layout or behavior, or shortcuts. I compared the reviewed range against its base. Nine files changed, and all are in scope for tests or the dev build: - Cargo.toml adds [profile.dev.package.cavalier_contours] debug-assertions = false. This changes only debug-assertion checks inside one dependency in dev builds. It does not change any user-facing setting, command, or layout. Per the check, a changed geometry or kernel result is not a UX default. The ci and release profiles are unchanged. - The ui-egui, ui-kit, viewport-egui, and window-gpu files change only test code. They call drop_without_applying_deltas() or clear textures_delta in tests. - crates/viewport-gpu/src/test_env.rs changes only the test helper shared. It adds a small buffer create and destroy before HELD is used. No application source changed. No preference, default value, shortcut, or layout changed. The description's Changes a default: no agrees with the diff. The check passes.
Finishing Touches
Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Reviewing files that changed from the base of the PR and between d5900c8 and 6e5e10d.
Files selected for processing: 9
Cargo.toml
crates/ui-egui/src/browser_canvas.rs
crates/ui-egui/src/prefs/pen.rs
crates/ui-egui/src/render_workspace_tests.rs
crates/ui-kit/src/file_preview_tests.rs
crates/ui-kit/src/window_chrome.rs
crates/viewport-egui/src/lib.rs
crates/viewport-gpu/src/test_env.rs
crates/window-gpu/src/runner.rs
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
@sethml quick status: this is green. What holds it is the change to the dev build profile in the root Cargo.toml, which I sign off on myself; it's on my list. Nothing is needed from you right now.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
approved-for-ciReviewed: run the full PR CI (build, tests, goldens, Clippy)area:uidesktop/web front end, dialogs, viewportstatus:decisionWaiting on a maintainer group decision; don't merge or close
2 participants
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Change
A plain
cargo testbuilds the tests in thedevprofile, which keeps debug assertions. CI'sciprofile and the release builds have none. So some tests pass on CI but fail in every local dev-build run, and one test binary aborts. This PR makes those tests pass in a dev build too. It changes tests and the dev build only; the app does not change.There are three causes:
ui-kit, seven inui-egui, one inwindow-gpuand one inviewport-egui. A frame that a test throws away now callsdrop_without_applying_deltas(), as Tests: a plain cargo test of the UI crate runs to the end in a dev build #25542 did. A frame whose output the test reads clears itstextures_deltafirst.viewport-gpu(macOS, debug builds). The GPU tests share one device per thread through a thread-local,HELD. When a test thread reused a device that another thread had opened, closing the queue inHELD's destructor opened an autorelease pool on Metal. In a debug build, objc2 records each pool in a thread-local of its own. That thread-local was destroyed first, so the whole binary aborted with "thread local panicked on drop", every run. The test helper now makes a small buffer before it first usesHELD. That opens a pool on Metal, so objc2's thread-local outlivesHELD. The helper already does the same for wgpu's own thread-local (Tests: the solidcraft-gpu tests deadlock in the NVIDIA driver on Linux, so cargo xtask ci never finishes #10232).io'sgerber::tests::hostile_input_never_panicstrips adebug_assertinside cavalier_contours 0.9.0, the latest release. The assertion checks the library's own intermediate data during a polygon boolean. Thedevprofile now builds this one crate without debug assertions, as CI and the releases already do.Changes a default: no
Validation
macOS 15, Apple Silicon. Full runs with
cargo xtask test(SOLIDCRAFT_TEST_JOBS=4), graded againsttests/KNOWN_FAILING_TESTS:ciprofile, onmainat 8e3bb3c: 10 tests fail, all Mac-only (listed below). None of the tests in this PR fail.devprofile, on the same commit: the same 10 tests fail, plus 14 texture tests (mainhas since fixed one of them and added another), the Gerber test, and theviewport-gpubinary aborts.devprofile, on this branch (based on 88669e4): the 14 texture tests, the Gerber test and all 155viewport-gputests pass. The Mac-only 10 still fail, as in theciprofile. One new test,issue_report::tests::an_agents_report_sends_the_design_only_on_the_persons_saved_choice(added today), failed once under the full run's load. It passed 3 of 3 runs alone, so it is not a dev-build failure.viewport-gpuwithout the change aborted in 8 of 8 runs; with it, 5 of 5 runs passed.cargo clippyonui-kit,window-gpu,viewport-egui,viewport-gpuandui-eguiwith--all-targets -- -D warnings, andcargo fmt --check: clean.For reference, the 10 Mac-only failures, unchanged by this PR: kernel
step_export_bytesandblend::tests::concave_chord_and_g2_rounds…; docforms::tests::circular_surface_default_and_denser_guides…; engineextent_tests::a_plain_to_on_an_edge…andextend_to_face_on_an_edge_keeps_the_snapped_face…,hole_face_tests::countersunk_hole_on_plane_tangent_to_cylinder_with_flip…, twocomponent_linktests andcmd::drawing::tests::save_as_keeps_drawing_sources…(all three on/varagainst/private/var), andflat_export_preserves_original_bytes. Two of these are fixed in #19284 (Tests: two engine tests pass on macOS).Screenshots of the behavior (when observable)
Tests and the dev build only; nothing changes in the app.
Integration status
Branched from
mainat 88669e4. It merges cleanly withmainat d5900c8. No open PR touches these tests' frame handling, the GPU test helper or the dev profile.🤖 Generated with Claude Code
Summary by CodeRabbit